import requests

# 测试/tool/describe_table接口
def test_describe_table():
    url = "http://60.205.132.242:3000/tool/describe_table"
    payload = {"table": "myapp01_mission"}  # 假设有Mission表，可根据实际表名调整
    resp = requests.post(url, json=payload)
    print("/tool/describe_table 返回:", resp.status_code, resp.json())

# 测试/tool/query接口
def test_query():
    url = "http://60.205.132.242:3000/tool/query"
    payload = {
        "sql": "SELECT * FROM myapp01_mission LIMIT 2",  # 假设有Mission表
        "params": []
    }
    resp = requests.post(url, json=payload)
    print("/tool/query 返回:", resp.status_code, resp.json())

if __name__ == "__main__":
    test_describe_table()
    test_query()